Clover coverage report - bexee - 0.1
Coverage timestamp: Do Dez 16 2004 13:24:06 CET
file stats: LOC: 75   Methods: 4
NCLOC: 39   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
AtomicActivityVisitor.java 66.7% 81.2% 75% 75%
coverage coverage
 1   
 /*
 2   
  * $Id: AtomicActivityVisitor.java,v 1.1 2004/12/15 14:18:10 patforna Exp $
 3   
  *
 4   
  * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
 5   
  * Berne University of Applied Sciences
 6   
  * School of Engineering and Information Technology
 7   
  * All rights reserved.
 8   
  */
 9   
 package bexee.model;
 10   
 
 11   
 import java.util.Iterator;
 12   
 import java.util.List;
 13   
 
 14   
 import bexee.model.activity.Activity;
 15   
 import bexee.model.activity.Flow;
 16   
 import bexee.model.activity.Scope;
 17   
 import bexee.model.activity.Sequence;
 18   
 import bexee.model.process.Process;
 19   
 
 20   
 /**
 21   
  * This is an abstact visitor which should be used as a superclass for all
 22   
  * visitors which wish to visit basic activities only.
 23   
  * 
 24   
  * @author Pawel Kowalski
 25   
  * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:10 $
 26   
  */
 27   
 public abstract class AtomicActivityVisitor extends AbstractBPELElementVisitor {
 28   
 
 29   
     /**
 30   
      * Visit the process, i.e. ask the root <code>Activity</code> to accept
 31   
      * this <code>Visitor</code>.
 32   
      */
 33  38
     public void visit(Process process) {
 34  38
         Activity rootActivity = process.getActivity();
 35  38
         if (rootActivity != null) {
 36  34
             rootActivity.accept(this);
 37   
         }
 38   
     }
 39   
 
 40   
     /**
 41   
      * Traverse all activities within a <code>Flow</code> activity.
 42   
      */
 43  24
     public void visit(Flow flow) {
 44  24
         List activities = flow.getActivities();
 45  24
         if (activities != null) {
 46  24
             for (Iterator iter = activities.iterator(); iter.hasNext();) {
 47  50
                 Activity activity = (Activity) iter.next();
 48  50
                 activity.accept(this);
 49   
             }
 50   
         }
 51   
     }
 52   
 
 53   
     /**
 54   
      * Traverse the only activity of a <code>Scope</code>.
 55   
      */
 56  0
     public void visit(Scope scope) {
 57  0
         Activity activity = scope.getActivity();
 58  0
         if (activity != null) {
 59  0
             activity.accept(this);
 60   
         }
 61   
     }
 62   
 
 63   
     /**
 64   
      * Traverse all activities within a <code>Sequence</code> activity.
 65   
      */
 66  36
     public void visit(Sequence sequence) {
 67  36
         List activities = sequence.getActivities();
 68  36
         if (activities != null) {
 69  36
             for (Iterator iter = activities.iterator(); iter.hasNext();) {
 70  142
                 Activity activity = (Activity) iter.next();
 71  142
                 activity.accept(this);
 72   
             }
 73   
         }
 74   
     }
 75   
 }